﻿<%@ Page Language="C#" CodeBehind="Products.aspx.cs" Inherits="Yglu.WebAdmin.Products_aspx" MasterPageFile="~/MainLayout.master" %>
<%@ MasterType TypeName="Yglu.WebAdmin.MainLayout_master" %>
<asp:Content ContentPlaceHolderID="MainContents" runat="server">
	<asp:Panel ID="PanEdit" CssClass="PanEditForm" runat="server">
		<fieldset class="FormField">
			<legend><asp:Literal ID="LitEditLegend" runat="server" /></legend>
			<asp:Image ID="ImgProductIcon" ImageAlign="Right" Width="48" Height="48" runat="server" />
			<ol>
				<li>
					<asp:Label AssociatedControlID="TxtProductId" meta:resourcekey="LblProductId" runat="server" />
					<asp:TextBox ID="TxtProductId" CssClass="FormText" Width="100px" meta:resourcekey="TxtProductId" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtProductTitle" meta:resourcekey="LblProductTitle" runat="server" />
					<asp:TextBox ID="TxtProductTitle" CssClass="FormText" Width="200px" meta:resourcekey="TxtProductTitle" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtProductTitle" Display="None" meta:resourcekey="ReqTxtProductTitle" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="TxtProductPrice" meta:resourcekey="LblProductPrice" runat="server" />
					<asp:TextBox ID="TxtProductPrice" CssClass="FormText" Width="100px" meta:resourcekey="TxtProductPrice" runat="server" />
					<asp:RequiredFieldValidator ControlToValidate="TxtProductPrice" Display="None" meta:resourcekey="ReqTxtProductPrice" runat="server" />
					<asp:RangeValidator ControlToValidate="TxtProductPrice" Display="None" Type="Double" MinimumValue="0" MaximumValue="9999" meta:resourcekey="ValTxtProductPrice" runat="server" />					
				</li>
				<li>
					<asp:Label AssociatedControlID="CboCategory" meta:resourcekey="LblCategory" runat="server" />
					<asp:DropDownList ID="CboCategory" CssClass="FormSelect" Width="200px" DataTextField="Title" DataValueField="Id" meta:resourcekey="CboCategory" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="CboStore" meta:resourcekey="LblStore" runat="server" />
					<asp:DropDownList ID="CboStore" CssClass="FormSelect" Width="200px" DataTextField="Title" DataValueField="Id" meta:resourcekey="CboStore" runat="server" />
				</li>
				<li>
					<asp:Label AssociatedControlID="ChkProductActive" meta:resourcekey="LblProductActive" runat="server" />
					<asp:CheckBox ID="ChkProductActive" meta:resourcekey="ChkProductActive" runat="server" />
				</li>
			</ol>
			<div class="FormFooterBar">
				<asp:Button CssClass="FormButton" OnClick="ButSave_Click" meta:resourcekey="ButSave" runat="server" />
				<asp:Button CssClass="FormButton" OnClick="ButCancel_Click" CausesValidation="false" meta:resourcekey="ButCancel" runat="server" />
				<asp:ValidationSummary CssClass="ValSummary" DisplayMode="List" ShowSummary="true" HeaderText="<%$ Resources:Messages,ValidationSummary %>" runat="server" />
			</div>
		</fieldset>
		<asp:PlaceHolder ID="PlaceReports" runat="server">
			<fieldset class="PageReportField">
				<legend><asp:Literal meta:resourcekey="LitOrderReports" runat="server" /></legend>
				<asp:GridView ID="GridReports" runat="server">
					<Columns>
						<asp:BoundField DataField="Title" ReadOnly="true" meta:resourcekey="GridColPeriod" />
						<asp:BoundField DataField="OrderCount" ReadOnly="true" meta:resourcekey="GridColOrderCount" />
						<asp:BoundField DataField="MostSoldInStoreTitle" ReadOnly="true" meta:resourcekey="GridColMostSoldStore" />
					</Columns>
				</asp:GridView>
			</fieldset>
		</asp:PlaceHolder>
	</asp:Panel>
	<asp:Panel ID="PanGrid" runat="server">
		<asp:Button ID="ButAddNew" CssClass="FormButton ButtonAddNew" OnClick="ButAddNew_Click" meta:resourcekey="ButAddNew" runat="server" />
		<asp:Label ID="LblGridCount" meta:resourcekey="LblGridCount" runat="server" />
		<asp:GridView ID="GridProducts" OnRowCommand="GridProducts_RowCommand" runat="server">
			<Columns>
				<asp:BoundField DataField="Id" SortExpression="Id" ReadOnly="true" meta:resourcekey="GridColId" />
				<asp:BoundField DataField="CategoryTitle" SortExpression="CategoryTitle" ReadOnly="true" meta:resourcekey="GridColCategory" />
				<asp:BoundField DataField="Title" SortExpression="Title" ReadOnly="true" meta:resourcekey="GridColTitle" />
				<asp:BoundField DataField="Price" SortExpression="Price" ReadOnly="true" DataFormatString="{0:0.00}" meta:resourcekey="GridColPrice" />
				<asp:BoundField DataField="AllStores" SortExpression="AllStores" ReadOnly="true" meta:resourcekey="GridColAllStores" />
				<asp:BoundField DataField="Active" SortExpression="Active" ReadOnly="true" meta:resourcekey="GridColActive" />
				<asp:ButtonField AccessibleHeaderText="Edit" meta:resourcekey="GridColEdit" />
			</Columns>
		</asp:GridView>
	</asp:Panel>
</asp:Content>